# !/usr/bin/env python
# -*- coding: utf-8 -*-

if __name__ == '__main__':

    d = {"a": 1, "b": 1}
    d['d'] = 'd'
    # key c不存在，用d['c']报错， d.get('c')为None
    print(d, d['a'], d.get('c'))

    d2 = dict(d)
    d2['d'] = 'd'
    print(d2)

    d3 = dict()
    d3['d'] = 'd'
    print(d3)
